package com.web_bloks.widget.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Image;

/**
 * 
 * @author Jean-Lou Dupont
 *
 */
public class RssWidget extends Button {

	Image img = null;
	
	String address = null;
	
	public RssWidget() {
		super();
		
		final WidgetMessages MSG = (WidgetMessages) GWT.create(WidgetMessages.class);
		
		WidgetImageBundle bundle = (WidgetImageBundle) GWT.create( WidgetImageBundle.class );
		
		AbstractImagePrototype p = null;
		
		this.setTitle(MSG.rss_copy_clipboard());

		p = bundle.rss();
		img = p.createImage();	
		
		this.getElement().appendChild(img.getElement());
	}

	/**
	 * Sets the Feed URL
	 * 
	 * @param feed String
	 */
	public void setFeed(String feed) {
		this.address = new String( feed );
	}

	
}//END